Don't error in Proced tests if %CPU is a NaN
authorLaurence Warne <laurencewarne@gmail.com>
Fri, 15 Nov 2024 15:22:52 +0000 (16:22 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 15 Nov 2024 15:22:52 +0000 (16:22 +0100)
commit926d47ab2ca72054f1a5c774916927160a839dc1
treec930e55d41d6ce3465292ce2a02ae20d2aab4702
parentc29c54410ea889bafc1bb4a29664827bc893b7d4
Don't error in Proced tests if %CPU is a NaN

* test/lisp/proced-tests.el (proced--cpu-at-point): New function.
(proced--assert-process-valid-cpu-refinement)
(proced-refine-test, proced-refine-with-update-test): If %CPU for any
process visited is a NaN skip the test.
(proced-update-preserves-pid-at-point-test): Fix typo in comment.
(proced--assert-process-valid-cpu-refinement-explainer): Add process
attributes to the explainer along with tweaking how the process %CPU is
obtained to account for circumstances where it's not numeric (most
notably '-nan').
test/lisp/proced-tests.el